home *** CD-ROM | disk | FTP | other *** search
- #include <IV-look/kit.h>
- #include <InterViews/background.h>
- #include <InterViews/place.h>
- #include <InterViews/session.h>
- #include <InterViews/style.h>
- #include <InterViews/window.h>
- #include <stdio.h>
-
- class App {
- public:
- void msg();
- };
-
- declare(ActionCallback,App)
- implement(ActionCallback,App)
-
- void App::msg() {
- printf("hi mom!\n");
- }
-
- int main(int argc, char** argv) {
- Session* session = new Session("Himom", argc, argv);
- Style* style = session->style();
- Kit* kit = Kit::instance();
- App* a = new App;
- session->run_window(
- new ApplicationWindow(
- new Background(
- new Margin(
- kit->simple_push_button(
- "Push me", style,
- new ActionCallback(App)(a, &App::msg)
- ),
- 10.0
- ),
- style->flat()
- )
- )
- );
- }
-